#include <stdio.h>
#include <unistd.h>
#include <System.h>
#include <fcntl.h>

/// <summary>
/// Main Entry
/// </summary>
int main (int argc, char *argv[])
{
	wchar_t runtime[256];

	if (GetRuntimeFile(runtime, 256) < 0)
		return -1;

	//wprintf ("%s\n", runtime);

	printf("UID: %d\n", GetUserID());

	//printf("NEW UID: %d\n", SetCurrentUserID(64000));

	printf("UID: %d\n", getuid());
	
	printf("PID: %d\n", GetProcessID());

	printf("PID: %d\n", getpid());

	printf("PPID: %d\n", GetParentProcessID());

	printf("PPID: %d\n", getppid());

	printf("GPID: %d\n", GetProcessGroupID(GetProcessID()));

	printf("GPID: %d\n", getpgid(getpid()));
	
	printf("GID: %d\n", GetGroupID());

	printf("GID: %d\n", getgid());

	const char *domain = "Mediacore";
	printf("DOMAIN: %d\n", SetDomainName(domain, 9));

	return 0;
}
